package com.woniu.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 杨光 微信号:tolryg
 * @time 10:11
 */
@RestController
public class FinanceController {


    @Autowired
    private RabbitTemplate rabbitTemplate;

    @RequestMapping("web/finance/pay")
    public String pay(String orderId){

        rabbitTemplate.convertAndSend("order_pay_success_exchange","order_pay_success_routingkey", orderId);
        return "ok";
    }
}
